package zoo.productqnareplyboard.admin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import zoo.productqnareplyboard.admin.dao.AdminQnAProductReplyBoardDao;

@Controller
public class AdminProductReplyBoardDeleteController {
	
	private AdminQnAProductReplyBoardDao aqnaDao;
	
	@Autowired
	public void setMemberService(AdminQnAProductReplyBoardDao aqnaDao) {
		this.aqnaDao = aqnaDao;
	}
	
	@RequestMapping("/admin/qnareplydel.do")
	public String process(@RequestParam("bqr_num") int bqr_num, @RequestParam("bq_num")int bq_num) {
			aqnaDao.deleteRepBoard(bqr_num);

			String forView = "redirect:/admin/qnadetail.do?bq_num="+bq_num;
			
			return forView;
	}
}
